package controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import pojo.Employee;
import service.empService;

import java.util.List;

@Controller
public class empController {

    @Autowired
    empService empService;
    @RequestMapping(value = "/findUser",method = RequestMethod.GET)
    public String findUser(Model model){
        List<Employee> list=empService.findUser();
        model.addAttribute("list",list);
        return "employee/list";
    }
}
